package com.coolwar.ioc;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {

    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(MyConfig.class);
        InstanceA instanceA = (InstanceA) context.getBean("instanceA");
        InstanceB instanceB = instanceA.getInstanceB();
        System.out.println("end");
    }

}
